home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Jumpstart / Multimedia Microsoft Jumpstart Version 1.1a (Microsoft).BIN / develpmt / sdk / vfw11.win / winvideo / setup.mst < prev    next >
Encoding:
Text File  |  1993-11-19  |  16.2 KB  |  419 lines

  1. '**************************************************************************
  2. '*                       VfW 1.1 Setup
  3. '**************************************************************************
  4. '$INCLUDE 'setupapi.inc'
  5. '$INCLUDE 'mscpydis.inc'    ''System
  6. '$INCLUDE 'msdetect.inc'    ''Detects Available Disk Space
  7.  
  8. ''Dialog ID's
  9. CONST WELCOME       = 100
  10. CONST ASKQUIT       = 200
  11. CONST DESTPATH      = 300
  12. CONST EXITFAILURE   = 400
  13. CONST EXITQUIT      = 600
  14. CONST EXITSUCCESS   = 700
  15. CONST OPTIONS       = 800
  16. CONST APPHELP       = 900
  17. CONST APPHELP2      = 1500
  18. CONST APPHELP3      = 1700
  19. CONST CHECK         = 2500
  20. CONST SMALLDEST     = 2100
  21. CONST SMALLWIN      = 2200
  22. CONST BADPATH       = 6400
  23. CONST RESTART       = 2600
  24. CONST RESTARTII     = 2700
  25.  
  26. ''Bitmap ID
  27. CONST LOGO = 1
  28.  
  29. GLOBAL File1
  30. GLOBAL SizeReq&  '' Total Disk Size required for installation
  31.  
  32. ''File Types
  33. GLOBAL DEST$        ''Default destination directory.
  34. GLOBAL WinDir$
  35. GLOBAL WinSysDir$
  36. GLOBAL WINDRIVE$    ''Windows Drive Letter.
  37. GLOBAL OPTCUR$      ''Option selection from option dialog.
  38. GLOBAL CHECKSTATES$
  39. GLOBAL CUIDLL$
  40.  
  41. DECLARE SUB Install
  42. DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
  43. DECLARE FUNCTION OnWindowsNT LIB "INIUPD.DLL" AS INTEGER
  44. DECLARE FUNCTION VflatdPresent LIB "iniupd.DLL" AS INTEGER
  45. DECLARE SUB Reboot LIB "iniupd.dll"
  46. DECLARE fUNCTION ExitWindowsExec  LIB "User" (Exec$, Param$) AS INTEGER
  47.  
  48. INIT:
  49.   
  50.     CUIDLL$ = "mscuistf.dll"            ''Custom user interface dll
  51.     HELPPROC$ = "FHelpDlgProc"          ''Help dialog procedure
  52.     
  53.     WIN32ENABLED% = 0
  54.     MajorVer% = GetWindowsMajorVersion()
  55.     MinorVer% = GetWindowsMinorVersion()
  56.  
  57.     IF MajorVer% < 3 OR (MajorVer% = 3 AND MinorVer% < 10) THEN
  58.     i% = DoMsgBox("Microsoft Windows version 3.10 or greater is required for this software.  Please upgrade your version of Windows.", "Installation Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  59.     END
  60.     END IF
  61.  
  62.     IF OnWindowsNT() THEN
  63.       i% = DoMsgBox("This version of Video for Windows does not run on Windows NT.", "Installation Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  64.       END
  65.     END IF
  66.  
  67.     SetBitmap CUIDLL$, LOGO
  68.     SetTitle "Video for Windows 1.1"
  69.  
  70.     szInf$ = GetSymbolValue("STF_SRCINFPATH")
  71.     IF szInf$ = "" THEN
  72.        szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP.INF"
  73.     END IF
  74.     ReadInfFile szInf$
  75.  
  76.     WINDRIVE$ = MID$(GetWindowsDir, 1, 1)
  77.     DEST$ = WINDRIVE$ + ":\WINVIDEO"
  78.     OPTCUR$ = "2"                         '' Set default option to Playback and Video Tools
  79.  
  80. WELCOME:
  81.     sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
  82.     IF sz$ = "CONTINUE" THEN
  83.        UIPop 1
  84. WELCOMEL1:
  85.     '' Get user and company name...
  86.        IF InitSystem(1, "", 0) = 0 THEN
  87.       GOSUB ASKQUIT
  88.       GOTO WELCOMEL1
  89.        END IF
  90.      ELSE
  91.     GOSUB ASKQUIT
  92.     GOTO WELCOME
  93.     END IF
  94.  
  95. '' Set the default value for the Sample Files RADIO Button.
  96.     AddListItem "CheckItemsIn", "ON"
  97.  
  98. OPTION:
  99.     SetSymbolValue "RadioDefault", OPTCUR$
  100. OPTL1:
  101.     sz$ = UIStartDlg(CUIDLL$, OPTIONS, "FRadioDlgProc", APPHELP2, HELPPROC$)
  102.     OPTCUR$ = GetSymbolValue("ButtonChecked")
  103.  
  104.     IF sz$ = "CONTINUE" THEN
  105.        UIPop(1)
  106.     ELSEIF sz$ = "REACTIVATE" THEN
  107.        GOTO OPTL1
  108.     ELSE
  109.        GOSUB ASKQUIT
  110.        GOTO OPTION
  111.     END IF
  112.  
  113. AVIFiles:
  114.     sz$ = UIStartDlg(CUIDLL$, CHECK, "FCheckDlgProc", 0, "")
  115.  
  116. '' Re-set file selection based on the user selection in case she decides to go back
  117. '' to the previous dialog box
  118.     SetSymbolValue "CheckItemsIn", GetListItem("CheckItemsOut", 1)
  119.     IF sz$ = "CONTINUE" THEN
  120.        UIPop 1
  121.     ELSEIF sz$ = "BACK" then
  122.        UIPop 1
  123.        GOTO OPTION
  124.     ELSEIF sz$ = "REACTIVATE" THEN
  125.        GOTO AVIFiles
  126.     ELSE
  127.        GOSUB ASKQUIT
  128.        GOTO AVIFiles
  129.     END IF
  130.  
  131. GETPATH:
  132.     SetSymbolValue "EditTextIn", DEST$
  133.     SetSymbolValue "EditFocus", "END"
  134. GETPATHL1:
  135.     sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", APPHELP3, HELPPROC$)
  136.     DEST$ = GetSymbolValue("EditTextOut")
  137.  
  138.     IF sz$ = "CONTINUE" THEN
  139.        IF IsDirWritable(DEST$) = 0 THEN
  140.       GOSUB BADPATH
  141.       GOTO GETPATHL1
  142.        END IF
  143.        UIPop 1
  144.     ELSEIF sz$ = "REACTIVATE" THEN
  145.        GOTO GETPATHL1
  146.     ELSEIF sz$ = "BACK" THEN
  147.        UIPop 1
  148.        GOTO AVIFiles
  149.     ELSE
  150.        GOSUB ASKQUIT
  151.        GOTO GETPATH
  152.     END IF
  153.  
  154. ''Prepare Copy list and check size
  155.  
  156.     ClearCopyList
  157.     SrcDir$ = GetSymbolValue("STF_SRCDIR")
  158.     WinDir$ = GetWindowsDir()
  159.     WinSysDir$ = GetWindowsSysDir()
  160.  
  161.  
  162. ''  Runtime files (on Windows disk)
  163.  
  164.     AddSectionFilesToCopyList "VfW Runtime", SrcDir$, WinSysDir$
  165.     AddSectionFilesToCopyList "OLE2", SrcDir$, WinSysDir$
  166.     AddSectionFilesToCopyList "ACM Drivers", SrcDir$, WinSysDir$
  167.     AddSectionFilesToCopyList "MPlayer", SrcDir$, WinDir$
  168.     AddSectionFilesToCopyList "AVICodecs", SrcDir$, WinSysDir$
  169.     AddSectionFilesToCopyList "Indeo-ini", SrcDir$, WinDir$
  170.     AddSectionFilesToCopyList "RleComp", SrcDir$, WinSysDir$
  171.    
  172. ''    TOOLS (on Windows disk)
  173.     IF OPTCUR$ = "2" THEN
  174.        AddSectionFilesToCopyList "MBrowser", SrcDir$, WinDir$
  175.        AddSectionFilesToCopyList "MBrowser Bitmaps", SrcDir$, WinSysDir$
  176.        AddSectionFilesToCopyList "ScrnCap Driver", SrcDir$, WinSysDir$
  177.        AddSectionFilesToCopyList "Videdit tools", SrcDir$, WinSysDir$
  178.     END IF
  179.  
  180. ''  Check windrive diskspace
  181.     SizeReq& = GetCopyListCost ("","", "")
  182.     IF SizeReq& <> 0 THEN
  183.     GOSUB SMALLWIN
  184.     END
  185.     END IF
  186.  
  187. '' Destination drive
  188. ''  AVI sample file and release notes
  189.     IF GetListItem("CheckItemsOut", 1) = "ON" THEN
  190.        AddSectionFilesToCopyList "AVI Sample", SrcDir$, DEST$
  191.        File1 = 1
  192.        AddSectionFilesToCopyList "ReadMe1", SrcDir$, DEST$
  193.     ELSE
  194.        File1 = 0
  195.        AddSectionFilesToCopyList "ReadMe", SrcDir$, DEST$
  196.     END IF
  197.  
  198. '' Tools
  199.     IF OPTCUR$ = "2" THEN
  200.        AddSectionFilesToCopyList "VidEdit", SrcDir$, DEST$
  201.        AddSectionFilesToCopyList "VidCap", SrcDir$, DEST$
  202.        AddSectionFilesToCopyList "ScrnCap", SrcDir$, DEST$
  203.     END IF
  204. ''  Check destination drive size
  205.     SizeReq& = GetCopyListCost ("","", "")
  206.     IF SizeReq& <> 0 THEN
  207.        GOSUB SMALLDEST
  208.        GOTO GETPATH
  209.     END IF
  210.  
  211. Install
  212.  
  213. '' Restart Windows: if it has to updates ACM from DOS, it restarts Windows automatically
  214. '' else, it gives the user the choice
  215.     RESTRT% = RestartListEmpty ()
  216.     Exe$ = DEST$ + "\_msrstrt.exe"
  217.     Batch$ = DEST$ + "\_mssetup.bat"
  218.     empty$ = ""
  219. RESTART:
  220.     IF RESTRT% = 0 THEN
  221.        sz$ = UIStartDlg(CUIDLL$, RESTART, "FInfo0DlgProc", 0, "")
  222.        IF sz$ = "REACTIVATE" THEN
  223.       GOTO RESTART
  224.        ENDIF
  225.        I% = ExitExecRestart ()
  226.        RemoveFile Exe$, cmoForce
  227.        RemoveFile Batch$, cmoForce
  228.        END
  229.     ELSE
  230.        sz$ = UIStartDlg(CUIDLL$, RESTARTII, "FQuitDlgProc", 0, "")
  231.        IF sz$ = "CONTINUE" THEN
  232.       I% = ExitWindowsExec (Exe$, empty$)
  233.       IF I% = 0 THEN
  234.          GOTO RESTART
  235.       ELSE
  236.          END
  237.      ENDIF
  238.        ELSEIF sz$ = "EXIT" THEN
  239.       UIPopAll
  240.       END
  241.        ELSEIF sz$ = "REACTIVATE" THEN
  242.       GOTO RESTART
  243.        ELSE
  244.       UIPop 1
  245.        END IF
  246.     END IF
  247.  
  248.  
  249. QUIT:
  250.     ON ERROR GOTO ERRQUIT
  251.  
  252.     IF ERR = 0 THEN
  253.     dlg% = EXITSUCCESS
  254.     ELSEIF ERR = STFQUIT THEN
  255.     dlg% = EXITQUIT
  256.     ELSE
  257.     dlg% = EXITFAILURE
  258.     END IF
  259. QUITL1:
  260.     sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
  261.     IF sz$ = "REACTIVATE" THEN
  262.     GOTO QUITL1
  263.     END IF
  264.     UIPop 1
  265.     END
  266.  
  267. ERRQUIT:
  268.     i% = DoMsgBox("An installation problem occured, call the product support service", "Setup Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  269.     END
  270.  
  271. BADPATH:
  272.     sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
  273.     IF sz$ = "REACTIVATE" THEN
  274.     GOTO BADPATH
  275.     END IF
  276.     UIPop 1
  277.     RETURN
  278.  
  279. ASKQUIT:
  280.     sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
  281.  
  282.     IF sz$ = "EXIT" THEN
  283.     UIPopAll
  284. ''        ERROR STFQUIT
  285.     END
  286.     ELSEIF sz$ = "REACTIVATE" THEN
  287.     GOTO ASKQUIT
  288.     ELSE
  289.     UIPop 1
  290.     END IF
  291.     RETURN
  292.  
  293. SMALLDEST:
  294.     sz$ = UIStartDlg(CUIDLL$, SMALLDEST, "FInfo0DlgProc", 0, "")
  295.     IF sz$ = "REACTIVATE" THEN
  296.     GOTO SMALLDEST
  297.     END IF
  298.     UIPop 1
  299.     RETURN
  300.  
  301. SMALLWIN:
  302.     sz$ = UIStartDlg(CUIDLL$, SMALLWIN, "FInfo0DlgProc", 0, "")
  303.     IF sz$ = "REACTIVATE" THEN
  304.     GOTO SMALLWIN
  305.     END IF
  306.     UIPop 1
  307.     RETURN
  308.  
  309. '**
  310. '** Purpose:
  311. '**     Performs all installation operations.
  312. '** Arguments:
  313. '**     none.
  314. '** Returns:
  315. '**     none.
  316. '*************************************************************************
  317. SUB Install STATIC
  318.  
  319.     CreateDir DEST$, cmoNone
  320.     SetRestartDir DEST$
  321.     CopyFilesInCopyList
  322.  
  323. ''Updating WIN.INI and SYSTEM.INI
  324.     IF VflatdPresent() = 0 THEN
  325.        CreateSysIniKeyValue WinDir$ + "system.ini", "386Enh", "device", "dva.386", cmoOverwrite
  326.     END IF
  327.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.CVID", "iccvid.drv", cmoOverwrite
  328.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.MSVC", "msvidc.drv", cmoOverwrite
  329.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.IV31", "indeov.drv", cmoOverwrite
  330.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.MRLE", "MSRLE.drv", cmoOverwrite
  331.     I% = DoesIniKeyExist ("system.ini", "Drivers", "VIDC.RT21")
  332.     IF I% = 0  THEN
  333.        CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.RT21", "indeov.drv", cmoOverwrite
  334.     END IF
  335.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.YVU9", "indeov.drv", cmoOverwrite
  336.     CreateIniKeyValue "WIN.INI", "mci extensions", "avi", "AVIVideo", cmoOverwrite
  337.     CreateIniKeyValue WinDir$ + "system.ini", "mci", "AVIVideo", "mciavi.drv", cmoOverwrite
  338.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "WaveMapper", "msacm.drv", cmoOverwrite
  339.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "MSACM.msadpcm", "msadpcm.acm", cmoOverwrite
  340.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "MSACM.imaadpcm", "imaadpcm.acm", cmoOverwrite
  341.     CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "msacm.drv", "Microsoft Sound Mapper V2.00", cmoOverwrite
  342.     CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "msadpcm.acm", "Microsoft ADPCM Codec V2.00", cmoOverwrite
  343.     CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "imaadpcm.acm", "Microsoft IMA ADPCM Codec V2.00", cmoOverwrite
  344.     IF OPTCUR$ = "2" THEN
  345.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Amazing_Events", "VFW11SAMPLE,\AMAZING.MBR,vidclip.bmp,Video for Windows 1.1 Amazing Events,Video for Windows 1.1 CD-ROM",cmoOverwrite
  346.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_America_the_Beautiful", "VFW11SAMPLE,\AMERICA.MBR,vidclip.bmp,Video for Windows 1.1 America the Beautiful,Video for Windows 1.1 CD-ROM",cmoOverwrite
  347.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Miscellaneous", "VFW11SAMPLE,\misc.MBR,funclip.bmp,Video for Windows 1.1 Miscellaneous,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  348.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Business", "VFW11SAMPLE,\BUSINESS.MBR,vidclip.bmp,Video for Windows 1.1 Business,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  349.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Faces", "VFW11SAMPLE,\FACES.MBR,vidclip.bmp,Video for Windows 1.1 Faces,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  350.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Movie_Clips", "VFW11SAMPLE,\MOVIES.MBR,funclip.bmp,Video for Windows 1.1 Movie Clips,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  351.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Musical_Performances", "VFW11SAMPLE,\MUSIC.MBR,funclip.bmp,Video for Windows 1.1 Musical Performances,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  352.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Nature", "VFW11SAMPLE,\NATURE.MBR,vidclip.bmp,Video for Windows 1.1 Nature,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  353.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Our_National_Parks", "VFW11SAMPLE,\PARKS.MBR,funclip.bmp,Video for Windows 1.1 Our National Parks,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  354.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Places", "VFW11SAMPLE,\PLACES.MBR,vidclip.bmp,Video for Windows 1.1 Places,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  355.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Science", "VFW11SAMPLE,\SCIENCE.MBR,vidclip.bmp,Video for Windows 1.1 Science,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  356.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Seasons", "VFW11SAMPLE,\SEASONS.MBR,vidclip.bmp,Video for Windows 1.1 Seasons,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  357.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Sharks:_Killers_of_the_Deep", "VFW11SAMPLE,\SHARKS.MBR,funclip.bmp,Video for Windows 1.1 Sharks: Killers of the Deep,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  358.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Space", "VFW11SAMPLE,\SPACE.MBR,vidclip.bmp,Video for Windows 1.1 Space,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  359.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Special", "VFW11SAMPLE,\SPECIAL.MBR,vidclip.bmp,Video for Windows 1.1 Special,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  360.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Sports", "VFW11SAMPLE,\SPORTS.MBR,vidclip.bmp,Video for Windows 1.1 Sports,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  361.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Compression_Comparison", "VFW11SAMPLE,\COMPRESS.MBR,vidclip.bmp,Video for Windows 1.1 Compression Comparison,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  362.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_The_Wild_West", "VFW11SAMPLE,\WILDWEST.MBR,funclip.bmp,Video for Windows 1.1 The Wild West,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  363.     End IF
  364.  
  365.     Run ("regedit.exe /s " + MakePath(WinDir$, "mplayer.reg"))
  366.     Run ("regedit.exe /s " + MakePath(WinSysDir$, "OLE2.reg"))
  367.     Run ("regedit.exe /s " + MakePath(WinSysDir$, "cleanup.reg"))
  368. '' Updating Progman Groups
  369.     CreateProgmanGroup "Video for Windows 1.1", "", cmoNone
  370.     ShowProgmanGroup  "Video for Windows 1.1", 1, cmoNone
  371. '' Mplayer
  372.     CreateProgmanItem "Video for Windows 1.1", "Media Player", MakePath(WinDir$, "mplayer.exe"), "", cmoOverwrite
  373. '' AVI sample file
  374.     IF File1 = 1 then
  375.        CreateProgmanItem "Video for Windows 1.1", "Sample Clip", MakePath(Dest$, "sample.avi"), "", cmoOverwrite
  376.     END IF
  377.  
  378. '' Readme.txt
  379.    CreateProgmanItem "Video for Windows 1.1", "Release Notes", MakePath(DEST$, "vfw.wri"), "", cmoOverwrite
  380.  
  381.     IF OPTCUR$ = "2" THEN
  382. '' Browser
  383.        CreateProgmanGroup "Accessories", "", cmoNone
  384.        ShowProgmanGroup  "Accessories", 1, cmoNone
  385.        CreateProgmanItem "Accessories", "Media Browser", MakePath(WinDir$, "mbrowser.exe"), "", cmoOverwrite
  386.  
  387. '' VidEdit
  388.        CreateProgmanItem "Video for Windows 1.1", "VidEdit", MakePath(DEST$,"videdit.exe"), "", cmoOverwrite
  389. '' VidCap
  390.        CreateProgmanItem "Video for Windows 1.1", "VidCap", MakePath(DEST$,"vidcap.exe"), "", cmoOverwrite
  391. '' ScrnCap
  392.        CreateProgmanItem "Video for Windows 1.1", "Screen Capture", MakePath(DEST$,"capscrn.exe"), "", cmoOverwrite
  393.     END IF
  394.     Run ("profdisp.exe")   
  395. END SUB
  396.  
  397. '**
  398. '** Purpose:
  399. '**     Appends a file name to the end of a directory path,
  400. '**     inserting a backslash character as needed.
  401. '** Arguments:
  402. '**     szDir$  - full directory path (with optional ending "\")
  403. '**     szFile$ - filename to append to directory
  404. '** Returns:
  405. '**     Resulting fully qualified path name.
  406. '*************************************************************************
  407. FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
  408.     IF szDir$ = "" THEN
  409.     MakePath = szFile$
  410.     ELSEIF szFile$ = "" THEN
  411.     MakePath = szDir$
  412.     ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
  413.     MakePath = szDir$ + szFile$
  414.     ELSE
  415.     MakePath = szDir$ + "\" + szFile$
  416.     END IF
  417. END FUNCTION
  418.  
  419.